export default {
    name: 'systemList',
    data() {
        return {
            systemListData: [{
                title: '企业信息审核',
                total: 0,
                currentIndex: 1,
                show: true
            }, {
                title: '会员拉黑',
                total: 0,
                currentIndex: 5,
                show: true
            }, {
                title: '会员还原',
                total: 0,
                currentIndex: 6,
                show: true
            }, {
                title: '知名企业审核',
                total: 0,
                currentIndex: 2,
                show: true
            }, {
                title: '优质企业审核',
                total: 0,
                currentIndex: 3,
                show: true
            }, {
                title: '反馈',
                total: 0,
                currentIndex: 7,
                show: true
            }, {
                title: '入职异常',
                total: 0,
                currentIndex: 8,
                show: true
            }, {
                title: '岗位下架',
                total: 0,
                currentIndex: 4,
                show: true
            }, {
                title: '期内离职异常',
                total: 0,
                currentIndex: 9,
                show: true
            }, {
                title: '爽约异常',
                total: 0,
                currentIndex: 10,
                show: true
            }, {
                title: '个人提现',
                total: 0,
                currentIndex: 11,
                show: false
            }, {
                title: '企业退款',
                total: 0,
                currentIndex: 12,
                show: false
            }, {
                title: '对公充值',
                total: 0,
                currentIndex: 13,
                show: false
            }],
            global: {},
            // optShowOne: false,
            // optShowTwo: false,
            txShowBth: false, //个人提现
            tkShowBtn: false, //企业退款
            czShowBtn: false, //对公充值
            adminShow: false
        };
    },
    methods: {
        toSystemList(index, total) {
            // if (total == 0) {
            //     return
            // }

            this.$emit('changeshow', index)
        },
        getList() {
            this.loading = true;
            this.$axios.post('/app/v1/platform/unusual/todoStatistics').then(resp => {
                if (resp.data.code == '1') {
                    this.systemListData[0].total = resp.data.data.companyauditfailed
                    this.systemListData[1].total = resp.data.data.memberblack
                    this.systemListData[2].total = resp.data.data.memberreduction
                    this.systemListData[3].total = resp.data.data.famouscompanyaudit
                    this.systemListData[4].total = resp.data.data.greatcompanyaudit
                    this.systemListData[5].total = resp.data.data.feedback
                    this.systemListData[6].total = resp.data.data.entryabnormal
                    this.systemListData[7].total = resp.data.data.positionoff
                    this.systemListData[8].total = resp.data.data.ensurequit
                    this.systemListData[9].total = resp.data.data.memberbreak
                    this.systemListData[10].total = resp.data.data.personalwithdrawreport || 0
                    this.systemListData[11].total = resp.data.data.companywithdrawreport || 0
                    this.systemListData[12].total = resp.data.data.publicrechargereport || 0
                    this.loading = false;
                }
            })
        },
    },
    created() {
        this.global = this.GLOBAL;
        let department = JSON.parse(localStorage.getItem('userinfo')).department;
        if (department == "提现二部") {
            this.txShowBth = true
            this.systemListData[10].show = true;
        } else if (department == "退款二部") {
            this.tkShowBtn = true;
            this.systemListData[11].show = true;
        } else if (department == "充值二部") {
            this.czShowBtn = true;
            this.systemListData[12].show = true;
        }

        let currentUserID = JSON.parse(localStorage.getItem('userinfo')).userid;
        if (currentUserID == "8bd928c61ae84a28b5257f612e3b5b43") {
            this.adminShow = true;
            this.systemListData[10].show = true;
            this.systemListData[11].show = true;
            this.systemListData[12].show = true;
        }
        this.getList();
    },
    mounted() {

    },
    computed: {
        ListData: function () {
            return this.systemListData.filter(function (item) {
                return item.show
            })
        }
    }
}